package com.wwlwxg.spring_security.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.HiddenHttpMethodFilter;

@Configuration
public class PathConfig {

  /**
   *  默认为_method， 自定义为_m
   *  <form method="post">
   *     <input type="hidden" _m="put">
   *  </form>
   * @return
   */
  @Bean
  public HiddenHttpMethodFilter hiddenHttpMethodFilter() {
    HiddenHttpMethodFilter filter = new HiddenHttpMethodFilter();
    filter.setMethodParam("_m");
    return filter;
  }


}
